1. Technical Field
This invention generally relates to computer systems, and more specifically relates to journaling changes in a database.
2. Background Art
Database systems have been developed that allow a computer to store a large amount of information in a way that allows a user to search for and retrieve specific information in the database. For example, an insurance company may have a database that includes all of its policy holders and their current account information, including payment history, premium amount, policy number, policy type, exclusions to coverage, etc. A database system allows the insurance company to retrieve the account information for a single policy holder among the thousands and perhaps millions of policy holders in its database.
Database systems typically include a database manager that assures the integrity of the database as changes to the database are made. The database manager typically records changes to a database in a journal. The journal allows changes to the database to be rolled back if needed. In addition, a journal may be used to replicate a database by applying the journaled changes to a remote database in the same order the journaled changes were made to the original database.
Most database managers known in the art record all bytes in a record into a log when a change is made to the record, including bytes in the record that do not change. Because recording data that has not changed takes valuable space and time in a database journal, a newer concept known as minimized data journaling was introduced. With a minimized data journal, only the changed bytes of a record are recorded without respect to field boundaries, which assumes that the bytes in the record that are not represented in the journal entry did not change. A minimized data journal is generally likely to achieve significantly better performance than a full data journal. Note, however, that this increase in performance comes at a usability cost.
Because a journal entry in a minimized data journal only includes the bytes that changed, the resulting journal entry is in a compressed format that may no longer be easily read, understood, and recognized by a human or auditing program. While this is not a concern in some settings, it may be a significant concern in other settings that require auditing, debugging, or human viewing of database changes. To perform an audit, a human auditor or auditing program typically compares the full image of the record before the change to a full image of the record after the change. The human auditor or auditing program thus expects to see the full record in performing the audit. Without a full record image, sensing the identity of the record (e.g., John Doe's bank account #12345), lining up the matching fields among the set of data collected, and recognizing field boundaries is made very difficult and does not constitute a friendly human interface. Because most minimized data journal entries do not contain the full record, nor even full fields, the resulting encoded data is not human-readable. For the purposes herein, the term “human-readable” means a format that does not portray an internal encoded representation of the changes, but rather a representation of the changes in full record layout with no partially represented fields. The data represented in this manner allows a human auditor or auditing program to easily discern the change that took place and is displayed in a manner consistent with using full journal data. For this reason, minimized data journals have generally not been used in environments that require auditing. As a result, environments that require auditing or occasional debugging based on the journal have not benefited from the performance increase provided by minimized data journals. Without a way to provide minimized journal data that may be output in human-readable form, the computer industry will be left with the undesirable choice between higher performance systems that use minimized journal data but cannot be easily audited, or lower performance systems that use full journal data that can be audited. Neither of these choices is desirable when both high performance and auditing is required.